package com.tedu.pj.common.pojo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.*;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * @author Song
 * @since 2020/10/21
 */
@Validated
@Data
public class Validation {

    @Length(min = 2,max = 10,message = "name长度不符合")
    @NotEmpty(message = "name为空")
    String name;

    @Email(message = "email 格式错误")
    String email;

    @AssertFalse
    Boolean validF;

    @AssertTrue
    Boolean validT;

    @Future
    Date future;

    @Past
    Date past;


}


